package com.puppet.building182.mapper;

import com.puppet.building182.pojo.DTO.HouseDto;
import com.puppet.building182.pojo.House;
import com.puppet.building182.pojo.VO.HouseState;
import com.puppet.building182.pojo.VO.HouseVo;
import com.puppet.building182.service.HouseService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HouseMapper {

    @Select(" select count(*)  from house_info where building_id=#{buildingId}")
    Integer countHouseByBuildingId(Integer buildingId);

    @Select("select id,house_no from house_info")
    List<HouseVo> getHouseIdAnd();

    Integer addHouse(House house);

    Integer deleteById(Integer id);

    Integer deleteHouse(@Param("ids") List<Integer> ids);

    List<House> getHouse( HouseDto houseDto);

    House getHouseById(Integer id);



    List<HouseState> getState();

    Integer updateHouse(House house);


}
